#ifndef CSUDOKU_H
#define CSUDOKU_H

#include <ctime>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <QObject>
#include <QColor>

class CSudoku:public QObject
{
    Q_OBJECT
private:
    int mp[9][9];
    bool row[9][9];
    bool grid[9][9];
    bool col[9][9];
    QColor mpFC[9][9];
    QColor mpBGc[9][9];
    int smod;
    int solves;
    int check(int,int,int*);
    void dfs();
    bool mydfs(int,int);

public:
    explicit CSudoku(QObject *parent = 0);
    enum{ANY=0,ALL=1};
    CSudoku(int n);
    CSudoku(int *data);
    virtual ~CSudoku();
    void display();
    int getAtom(int x,int y);
    int resolve(int mod=ALL);

    void solve();
signals:
    void sendThis();
};

#endif // CSUDOKU_H
